home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1994 #2 / Monster Media No. 2 (Monster Media)(1994).ISO / database / sac.zip / INSTALL.BAT < prev    next >
DOS Batch File  |  1994-06-20  |  8KB  |  276 lines

  1.  
  2. echo off
  3. rem Batch file: Install.bat 01.03.01
  4. rem Programmer: D. Allen
  5. rem Created: 04/18/93
  6. rem Updated: 06/20/94
  7. rem Copyright (c) 1993
  8. cls
  9. kls 1
  10. echo.
  11. echo          Installing Foxpro application...
  12. echo.
  13. echo.
  14. echo     At each prompt, press [Enter] for the default, [Esc] to abort...
  15. if exist input.exe goto step1
  16. echo.
  17. echo.
  18. echo     Please log onto the drive containing the installation disk
  19. echo     before running the INSTALL program.
  20. goto quit
  21.  
  22. :step1
  23. set tmp=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
  24. if not %tmp%.==. goto step2
  25. echo.
  26. echo.
  27. echo     Out of environment space.  Please add the following to your CONFIG.SYS
  28. echo.
  29. echo     SHELL=C:\DOS\COMMAND.COM C:\DOS\ /E:1024 /p
  30. echo.
  31. echo     Note:  If you already have /E:1024, then use /E:2048.
  32. goto quit
  33.  
  34. :step2
  35. set prg=c:\sky\sac
  36. echo.
  37. echo.
  38. input "     Please enter the Foxpro application directory: " /mprg /f180 /q 23 31 
  39. if errorlevel 254 goto quit
  40. if %prg%.==. goto quit
  41. bd %prg%\bak
  42. set tmp=
  43. if not exist %prg% copy read.me %prg%\read.me > nul
  44. if not exist %prg%\read.me set tmp=not
  45. for %%f in (%prg%\*.com) do set tmp=com
  46. for %%f in (%prg%\*.sys) do set tmp=sys
  47. if %tmp%.==. goto step3
  48. echo.
  49. echo.
  50. echo     Error:  Cannot install on directory %prg%\
  51. if exist %prg% echo             (%prg% exists as a file)
  52. if %tmp%.==com. echo            (%prg% has a COM file)
  53. if %tmp%.==sys. echo            (%prg% has a SYS file)
  54. goto step2
  55.  
  56. :step3
  57. set run=c:\foxrun
  58. echo.
  59. echo.
  60. input "     Please enter the Foxpro or Foxpro runtime directory: " /mrun /f180 /q 23 31 
  61. if errorlevel 254 goto quit
  62. set runr=%run%\foxr
  63. if exist %run%\foxr.exe    goto step4
  64. set runr=%run%\foxrw
  65. if exist %run%\foxrw.exe   goto step4
  66. set runr=%run%\fox
  67. if exist %run%\fox.exe     goto step4
  68. set runr=%run%\foxpro
  69. if exist %run%\foxpro.exe  goto step4
  70. set runr=%run%\foxprox
  71. if exist %run%\foxprox.exe goto step4
  72. set runr=%run%\foxprow
  73. if exist %run%\foxprow.exe goto step4
  74. echo.
  75. echo.
  76. echo     Error:  Foxpro does not exist on directory %run%\
  77. goto step3
  78.  
  79. :step4
  80. echo.
  81. echo.
  82. input "     Do you want to install as a multi-user application? " /q 23 31 /n+ /mmult
  83. if errorlevel 254 goto quit
  84. echo.
  85. echo.
  86. input "     Do you want to install as a system administrator? " /q 23 31 /n+ /minit
  87. if errorlevel 254 goto quit
  88. echo.
  89. echo.
  90. input "     Do you want to save Browse command preferences? " /q 23 31 /n+ /mlast
  91. if errorlevel 254 goto quit
  92. echo.
  93. echo.
  94. input "     Do you want to recall deleted records? " /q 23 31 /n+ /mrecall
  95. if errorlevel 254 goto quit
  96. echo.
  97. echo.
  98. input "     Do you want the system menu displayed? (Foxpro for DOS) " /q 23 31 /n+ /msysm
  99. if errorlevel 254 goto quit
  100.  
  101. echo.
  102. echo.
  103. echo     Installation proceeding.  Please wait...
  104.  
  105. for %%f in (%prg%\bak\*.*) do del %%f
  106. for %%f in (%prg%\scr.*)   do del %%f
  107.  
  108. for %%f in (%prg%\*.cdx)         do copy %%f %prg%\bak > nul
  109. for %%f in (%prg%\*.dbf)         do copy %%f %prg%\bak > nul
  110. for %%f in (%prg%\*.fpt)         do copy %%f %prg%\bak > nul
  111. for %%f in (%prg%\*.mem)         do copy %%f %prg%\bak > nul
  112. for %%f in (%prg%\config.fp?)    do copy %%f %prg%\bak > nul
  113. if exist %prg%\foxpro.ini    copy %prg%\foxpro.ini %prg%\bak > nul
  114. if exist %prg%\sac.bat copy %prg%\sac.bat %prg%\bak > nul
  115.  
  116. for %%f in (%prg%\*.plb) do attrib -r %%f > nul
  117.  
  118. for %%f in (%prg%\*.tmp) do del %%f
  119.  
  120. copy xd.exe      %prg% > nul
  121. copy register.doc %prg% > nul
  122. copy read.me      %prg% > nul
  123. copy file_id.diz  %prg% > nul
  124.  
  125. pkunzip -d -o foxpro *.* %prg%
  126.  
  127. for %%f in (%prg%\*.plb)      do attrib +r %%f > nul
  128.  
  129. for %%f in (%prg%\bak\*.*) do copy %%f %prg% > nul
  130.  
  131. if %mult%.==NO. goto user2
  132.  
  133. :user1
  134.  
  135. set drv=%run%\user1
  136. cls
  137. kls 1
  138. echo.
  139. echo          Installing resource directories...
  140. echo.
  141. echo     This is a multi-user application.  Each user or workstation needs a
  142. echo     unique resource directory.  When prompted, type the desired resource
  143. echo     directory and press [Enter].  You will be prompted for any additional
  144. echo     directories.  When finished, simply press [Enter] to continue, press
  145. echo     [Esc] to abort...
  146. :user11
  147. echo.
  148. echo.
  149. input "     Please enter the next resource directory: " /mdrv /f180 /q 23 31 
  150. if errorlevel 254 goto quit
  151. if %drv%.==. goto final
  152. bd %drv%
  153. if not exist %drv% copy read.me %drv%\read.me > nul
  154. if exist %drv%\read.me goto user3
  155. echo.
  156. echo.
  157. echo     Error:  Cannot install user on directory %drv%\
  158. if exist %drv% echo             (%drv% exists as a file)
  159. set drv=
  160. goto user11
  161.  
  162. :user2
  163.  
  164. set drv=%prg%
  165. cls
  166. kls 1
  167. echo.
  168. echo          Installing startup directory...
  169. echo.
  170. echo     This is a single-user application.  You need to define your startup
  171. echo     directory.  Also known as the user resource directory.
  172. echo     Press [Enter] for the default, [Esc] to abort...
  173. :user21
  174. echo.
  175. echo.
  176. input "     Please enter startup directory: " /mdrv /f180 /q 23 31 
  177. if errorlevel 254 goto quit
  178. if %drv%.==. goto final
  179. bd %drv%
  180. if not exist %drv% copy read.me %drv%\read.me > nul
  181. if exist %drv%\read.me goto user3
  182. echo.
  183. echo.
  184. echo     Error:  Cannot install startup directory %drv%\
  185. if exist %drv% echo             (%drv% exists as a file)
  186. set drv=
  187. goto user21
  188.  
  189. :user3
  190.  
  191. if not exist %drv%\foxuser.dbf copy %prg%\foxuser.* %drv% > nul
  192.  
  193. if exist %drv%\config.fp copy %drv%\config.fp %drv%\config.bak > nul
  194. echo _FOXDOC   = ''> %drv%\config.fp
  195. echo _FOXGRAPH = ''>> %drv%\config.fp
  196. echo _GENGRAPH = ''>> %drv%\config.fp
  197. echo BELL = OFF>> %drv%\config.fp
  198. echo DEVELOPMENT = OFF>> %drv%\config.fp
  199. echo FILES = 45>> %drv%\config.fp
  200. echo INDEX = NDX>> %drv%\config.fp
  201. echo MVARSIZE = 20>> %drv%\config.fp
  202. echo MVCOUNT = 512>> %drv%\config.fp
  203. echo RESOURCE = %drv%\>> %drv%\config.fp
  204. echo RESOURCE = ON>> %drv%\config.fp
  205. echo SAFETY = OFF>> %drv%\config.fp
  206. echo STATUS = OFF>> %drv%\config.fp
  207. echo TALK = OFF>> %drv%\config.fp
  208.  
  209. if exist %drv%\foxpro.ini copy %drv%\foxpro.ini %drv%\foxpro.bak > nul
  210. echo [GetEnv]> %drv%\foxpro.ini
  211. if %init%.==YES. echo init=yes>> %drv%\foxpro.ini
  212. if %last%.==YES. echo last=yes>> %drv%\foxpro.ini
  213. if %mult%.==YES. echo mult=yes>> %drv%\foxpro.ini
  214. if %recall%.==YES. echo recall=yes>> %drv%\foxpro.ini
  215. if %sysm%.==YES. echo sysmenu=show>> %drv%\foxpro.ini
  216.  
  217. if exist %drv%\sac.bat copy %drv%\sac.bat %drv%\sac.bak > nul
  218. echo echo off> %drv%\sac.bat
  219. if not %prg%.==%drv%. echo %prg%\xd %prg%\ /!>> %drv%\sac.bat
  220. echo %runr% -t -c%drv%\config.fp -m3500 sac>> %drv%\sac.bat
  221. if not %prg%.==%drv%. echo %prg%\xd %drv%\ /!>> %drv%\sac.bat
  222. echo cls>> %drv%\sac.bat
  223. echo echo.>> %drv%\sac.bat
  224. if not exist %prg%\sac.prg echo echo %prg% application (shareware version)>> %drv%\sac.bat
  225. if exist %prg%\sac.prg echo echo %prg% application (registered version)>> %drv%\sac.bat
  226. echo echo (c) 1993 Dennis Allen>> %drv%\sac.bat
  227. echo echo All rights reserved>> %drv%\sac.bat
  228. echo echo.>> %drv%\sac.bat
  229.  
  230. echo.
  231. echo.
  232. echo.     Resource directory %drv% installed...
  233. if %mult%.==YES. set drv=
  234. if %mult%.==YES. goto user11
  235. :final
  236.  
  237. see read.me
  238. cls
  239. kls 1
  240. echo     Installation complete.
  241. echo.
  242. if %mult%.==YES. set drv=resource_directory
  243. echo     To run your application, type "sac" from the %drv% prompt...
  244. if exist %prg%\sac.man echo     To print your manual, select option "M" of the system setup menu...
  245. echo.
  246. echo     Copyright Notices:
  247. echo.
  248. echo     Foxpro and MS-DOS are registered trademarks of Microsoft Corporation
  249. echo.
  250. echo     PKUNZIP.EXE is a product of PkWare, Inc.
  251. echo.
  252. echo     BD.COM is a product from Daniel A. Crone, Compu-Serve #73027,1435
  253. echo.
  254. echo     INPUT.EXE, KLS.EXE and XD.EXE are part of the shareware
  255. echo     utility set from Steenburgh's STUFF, a product of Tay-Jee Software.
  256. echo     For more information, call (703) 464-5290.
  257. echo.
  258. echo     SEE.EXE is a product of Pinnacle Software.
  259. echo.
  260. if not exist %prg%\sac.prg echo     %prg% application (shareware version)
  261. if exist %prg%\sac.prg echo     %prg% application (registered version)
  262. echo     (c) 1993 Dennis Allen
  263. echo     All rights reserved
  264.  
  265. :quit
  266.  
  267. set drv=
  268. set init=
  269. set last=
  270. set mult=
  271. set prg=
  272. set run=
  273. set runr=
  274. set recall=
  275. set sysm=
  276. set tmp=